#FROM python:3.5-stretch
FROM python:3.7-buster

ADD requirements.txt /
RUN pip install --no-cache-dir -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

#RUN rm /etc/apt/sources.list
#ADD container/sources.list /etc/apt/sources.list
RUN apt-get -y update

#RUN apt-get -y install supervisor
#ADD container/supervisord/ggac_celery.conf /etc/supervisor/conf.d/ggac_celery.conf

#ADD container/python_package/dysms_python /dysms_python
#RUN cd /dysms_python && python setup.py install

#ADD container/python_package/phonenumber /phonenumber
#RUN cd /phonenumber && python setup.py install

RUN mkdir -p /usr/src/app
ADD . /usr/src/app
WORKDIR /usr/src/app

EXPOSE 8001

CMD [ "python", "./manage.py", "runserver", "0.0.0.0:8000"]
